class StunNadeParalyzeProj extends FlameTendril;

var KFMonster StuckTo;
var float Duration;

simulated function PostBeginPlay();

simulated singular function HitWall(vector HitNormal, actor Wall)
{
	Destroy();
}

simulated function Landed( vector HitNormal )
{
	Destroy();
}

simulated function Explode(vector HitLocation,vector HitNormal)
{
	Destroy();
}

simulated function ProcessTouch (Actor Other, vector HitLocation);

simulated function Destroyed();

function Timer()
{
	if (StuckTo != None)
	{
		DKMonster(StuckTo).RemoveSlowingDebuf(class'DKMonster'.default.MC_PARALYZE);
	}
	Destroyed();
	Destroy();
}

function SetSpeeds()
{
	local string MonName;
	
	MonName = Caps(StuckTo.MenuName);
	
	if ( MonName ~= "FLESH POUND" || MonName ~= "BRUTE" || MonName ~= "KEVIN CLAMELY" )
	{
		Destroyed();
		Destroy();
		return;
	}
	
	DKMonster(StuckTo).AddSlowingDebuf(class'DKMonster'.default.MC_PARALYZE);
}

simulated function Stick(actor HitActor, vector HitLocation)
{
	local name NearestBone;
	local float dist;

	StuckTo=KFMonster(HitActor);
	SetSpeeds();
	
	SetPhysics(PHYS_None);

	NearestBone = GetClosestBone(HitLocation, HitLocation, dist , 'CHR_Spine2' , 15 );
	HitActor.AttachToBone(self,NearestBone);
	
	SetTimer(Duration,false);
}

simulated function DestroyTrail()
{
	if ( Trail != none )
	{
		Trail.mRegen=False;
		Trail.SetPhysics(PHYS_None);
	}

	if ( FlameTrail != none )
	{
		FlameTrail.Kill();
		FlameTrail.SetPhysics(PHYS_None);
	}
}

defaultproperties
{
     Speed=1.000000
     MaxSpeed=1.000000
     Damage=15.000000
     DamageRadius=1.000000
     //MyDamageType=Class'WTF.WTFEquipDamTypeLethalInjection'
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'KF_pickups2_Trip.Supers.MP7_Dart'
     LifeSpan=99999.0
     DrawScale=0.010000
	 Duration = 3.5
}
